﻿#region LGPL License

/*
OpenSearchNet
Copyright (c) 2014, Brad Hards <bradh@frogmouth.net>, All rights reserved.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library.
*/

#endregion LGPL License

namespace OpenSearch
{
    /// <summary>
    /// Common constants for OpenSearch
    /// </summary>
    public static class Constants
    {
        /// <summary>
        /// Namespace constant for OpenSearch 1.1
        /// </summary>
        /// <remarks>
        /// <para>This is the core namespace from the OpenSearch 1.1 Draft 5 specification.</para>
        ///
        /// <para>It is referenced from IC/DoD Interface Encoding Specification for CDR Search, Table 1.</para>
        ///
        /// <para>This string is not intended to be displayed to a user. It is intended for extension element lookup.</para>
        /// </remarks>
        /// <example>
        /// <code>
        /// feed.ElementExtensions.ReadElementExtensions&lt;int&gt;("startIndex", Constants.NSOpenSearch);
        /// </code>
        /// </example>
        public const string NSOpenSearch = "http://a9.com/-/spec/opensearch/1.1/";

        /// <summary>
        /// Namespace constant for OpenSearch Geo Extension
        /// </summary>
        /// <remarks>
        /// <para>This is the namespace from the OpenSearch Geo Extension 1.0 Draft 2 specification.</para>
        ///
        /// <para>This string is not intended to be displayed to a user. It is intended for extension element lookup.</para>
        /// </remarks>
        /// <example>
        /// <code>
        /// query.ElementExtensions.ReadElementExtensions&lt;int&gt;("name", Constants.NSOpenSearchGeo);
        /// </code>
        /// </example>
        public const string NSOpenSearchGeo = "http://a9.com/-/opensearch/extensions/geo/1.0/";

        /// <summary>
        /// Namespace constant for OpenSearch Relevance Extension
        /// </summary>
        /// <remarks>
        /// <para>This is the namespace from the OpenSearch Relevance Extension 1.0 Draft 1 specification.</para>
        /// <para>This string is not intended to be displayed to a user. It is intended for extension element lookup.</para>
        /// </remarks>
        /// <example>
        /// <code>
        /// item.ElementExtensions.ReadElementExtensions&lt;double&gt;("score", Constants.NSOpenSearchRelevance);
        /// </code>
        /// </example>
        public const string NSOpenSearchRelevance = "http://a9.com/-/opensearch/extensions/relevance/1.0/";

        /// <summary>
        /// Namespace constant for OpenSearch Federation Extension
        /// </summary>
        /// <remarks>
        /// <para>
        /// This is the namespace from the OpenSearch Federation Extension, defined in IC/DoD REST Interface Encoding
        /// specification for Brokered Search V1.1 12 May 2011.
        /// </para>
        /// <para>
        /// This string is not intended to be displayed to a user. It is intended for extension element lookup.
        /// </para>
        /// </remarks>
        /// <example>
        /// <code>
        /// item.ElementExtensions.ReadElementExtensions&lt;string&gt;("shortName", Constants.NSOpenSearchFederation);
        /// </code>
        /// </example>
        public const string NSOpenSearchFederation = "http://a9.com/-/opensearch/extensions/federation/1.0/";

        /// <summary>
        /// Namespace constant for OpenSearch Time Extension
        /// </summary>
        /// <remarks>
        /// <para>This is the namespace from the OpenSearch Time Extension 1.0 Draft 1 specification.</para>
        ///
        /// <para>This string is not intended to be displayed to a user. It is intended for extension element lookup.</para>
        /// </remarks>
        /// <example>
        /// <code>
        /// query.ElementExtensions.ReadElementExtensions&lt;string&gt;("start", Constants.NSOpenSearchTime);
        /// </code>
        /// </example>
        public const string NSOpenSearchTime = "http://a9.com/-/opensearch/extensions/time/1.0/";

        /// <summary>
        /// Namespace constant for OpenSearch SRU Extension
        /// </summary>
        /// <remarks>
        /// <para>This is the namespace from the OpenSearch SRU (Search and Retrieval via URL) Extension 1.0 Draft 1 specification.</para>
        ///
        /// <para>This string is not intended to be displayed to a user. It is intended for extension element lookup.</para>
        /// </remarks>
        /// <example>
        /// <code>
        /// query.ElementExtensions.ReadElementExtensions&lt;string&gt;("sortKeys", Constants.NSOpenSearchSearchRetrievalViaUrl);
        /// </code>
        /// </example>
        public const string NSOpenSearchSearchRetrievalViaUrl = "http://a9.com/-/opensearch/extensions/sru/2.0/";

        internal const string NSAtom = "http://www.w3.org/2005/Atom";
    }
}